package com.example.zhu95.mytimber.ui;

import android.content.Context;
import android.util.AttributeSet;

import com.example.zhu95.mytimber.entity.AlbumBean;

import xyz.danoz.recyclerviewfastscroller.sectionindicator.title.SectionTitleIndicator;

/**
 * @author zhu95 on 2017/12/13.
 */
public class AlbumsSectionTitleIndicator extends SectionTitleIndicator<AlbumBean> {
    public AlbumsSectionTitleIndicator(Context context) {
        super(context);
    }

    public AlbumsSectionTitleIndicator(Context context, AttributeSet attrs) {
        super(context, attrs);
    }

    public AlbumsSectionTitleIndicator(Context context, AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
    }

    @Override
    public void setSection(AlbumBean album) {

        // Example of using a single character
        setTitleText(album.getAlbum().charAt(0) + "");

        // Example of using a longer string
        // setTitleText(song.getName());

        // setIndicatorTextColor(song.getAsColor());
    }
}
